#include "xmppcore/iq.h"
#include "xmppcore/constants.h"

namespace yoohoo_xmppcore {

const ProtocolKey Iq::PROTOCOL_KEY = ProtocolKey(XMPP_STRING_IQ);

Iq::Iq() {
}

Iq::Iq(const Iq& other) : Stanza(other) {
}
	
Stanza::StanzaKind Iq::stanzaKind() const {
	return Stanza::StanzaKindIq;
}

void Iq::setIqType(Iq::IqType iqType) {
	_iqType = iqType;
	if (Iq::IqTypeSet == _iqType) {
		_d->type = "set";
	} else if (Iq::IqTypeGet == _iqType) {
		_d->type = "get";
	} else {
		_d->type = "result";
	}
}

Iq::IqType Iq::iqType() const {
	return _iqType;
}

void Iq::doToXml(XmlWriter* xmlWriter) {
}

}
